﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/ViewMasterPageMain.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<estudent.Models.SDrzave>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
	Index
</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="InnerRightContent" runat="server">

    <h1>Šifrant držav</h1>

    <table border="1">
        <tr>
            <th>
                Akcije
            </th>
            <th>
                Šifra države
            </th>
            <th>
                Ime države
            </th>
            <th>
                Veljavnost
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
            <td>
                <%: Html.ActionLink("Uredi", "Edit", new { id=item.sDrzava }) %> |
                <%: Html.ActionLink("Spremeni veljavnost", "Delete", new { id = item.sDrzava })%>
            </td>
            <td>
                <%: item.sDrzava %>
            </td>
            <td>
                <%: item.imeDrzava %>
            </td>
            <td>
                <% if (item.veljavno == false) { Response.Write("Neveljavna"); } %>
            </td>
        </tr>
    
    <% } %>

    </table>

    <p>
        <%: Html.ActionLink("Ustvari nov zapis", "Create") %>
    </p>

</asp:Content>

<asp:Content ID="Content3" ContentPlaceHolderID="JQueryContent" runat="server">
</asp:Content>

